package com.lt.integration.jpa.component.common;

public class MatchMode {

    /**
     * Match the entire string to the pattern
     * @param pattern
     * @return
     */
    public static String EXACT(String pattern){
        return pattern;
    }

    /**
     * Match the start of the string to the pattern
     */
    public static String START(String pattern){
        return pattern + '%';
    }

    /**
     * Match the end of the string to the pattern
     */
    public static String END(String pattern){
        return '%' + pattern;
    }

    /**
     * Match the pattern anywhere in the string
     */
    public static String ANYWHERE(String pattern){
        return '%' + pattern + '%';
    }

}